home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{D1D71990-5C1B-11CF-8E84-00AA006DB209}#1.0#0"; "Chklist.ocx"
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 5415
- ClientLeft = 60
- ClientTop = 720
- ClientWidth = 5475
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 5415
- ScaleWidth = 5475
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton Command8
- Caption = "Check All"
- Height = 495
- Left = 4200
- TabIndex = 16
- Top = 2760
- Width = 1095
- End
- Begin VB.CommandButton Command7
- Caption = "UnCheck All"
- Height = 495
- Left = 4200
- TabIndex = 15
- Top = 2160
- Width = 1095
- End
- Begin VB.CommandButton Command6
- Caption = "CheckItem"
- Height = 375
- Left = 3720
- TabIndex = 14
- Top = 960
- Width = 1095
- End
- Begin VB.CommandButton Command5
- Caption = "Find Text"
- Height = 375
- Left = 3720
- TabIndex = 13
- Top = 1440
- Width = 1095
- End
- Begin VB.CommandButton Command4
- Caption = "Delete All"
- Height = 375
- Left = 960
- TabIndex = 11
- Top = 1440
- Width = 1095
- End
- Begin VB.CommandButton Command2
- Caption = "Delete Selected"
- Height = 375
- Left = 2160
- TabIndex = 8
- Top = 1440
- Width = 1455
- End
- Begin VB.TextBox Text4
- Height = 285
- Left = 3360
- TabIndex = 6
- Text = "Text4"
- Top = 4800
- Width = 735
- End
- Begin VB.TextBox Text3
- Height = 285
- Left = 3360
- TabIndex = 4
- Text = "Text3"
- Top = 4320
- Width = 735
- End
- Begin VB.CheckBox Check1
- Caption = "IsChecked"
- Height = 255
- Left = 960
- TabIndex = 3
- Top = 4320
- Width = 1095
- End
- Begin VB.TextBox Text2
- Height = 285
- Left = 960
- TabIndex = 9
- Text = "Text2"
- Top = 3840
- Width = 3135
- End
- Begin VB.CommandButton Command3
- Caption = "Add Text && Check"
- Height = 375
- Left = 2160
- TabIndex = 2
- Top = 960
- Width = 1455
- End
- Begin VB.CommandButton Command1
- Caption = "Add Text"
- Height = 375
- Left = 960
- TabIndex = 1
- Top = 960
- Width = 1095
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 960
- TabIndex = 0
- Text = "Another Line of text"
- Top = 600
- Width = 3135
- End
- Begin VB.Frame Frame1
- Caption = "When Selection Changes"
- Height = 1575
- Left = 720
- TabIndex = 12
- Top = 3600
- Width = 3615
- End
- Begin CHKLISTLib.ChkList ChkList1
- Height = 1335
- Left = 990
- TabIndex = 10
- Top = 2055
- Width = 3135
- _Version = 65536
- _ExtentX = 5530
- _ExtentY = 2355
- _StockProps = 77
- BackColor = 12632256
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Label Label3
- Caption = "Index"
- Height = 255
- Left = 2640
- TabIndex = 7
- Top = 4800
- Width = 615
- End
- Begin VB.Label Label2
- Caption = "Count"
- Height = 255
- Left = 2640
- TabIndex = 5
- Top = 4320
- Width = 615
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub ChkList1_SelectionChanged(ByVal Index As Integer)
- Text2.Text = ChkList1.GetString(Index)
- Text3.Text = ChkList1.GetCount
- Text4.Text = Index
- If ChkList1.IsChecked(Index) = True Then
- Check1.Value = 1
- Check1.Value = 0
- End If
- End Sub
- Private Sub Command1_Click()
- ChkList1.AddString (Text1.Text)
- End Sub
- Private Sub Command2_Click()
- Index = ChkList1.GetCurSel
- If Index > -1 Then
- ChkList1.DeleteItem (Index)
- End If
- End Sub
- Private Sub Command3_Click()
- ChkList1.AddStringCheck Text1.Text, True
- End Sub
- Private Sub Command4_Click()
- ChkList1.Clear
- End Sub
- Private Sub Command5_Click()
- n = 0
- 'n = ChkList1.FindString(Text1.Text)
- 'n = ChkList1.FindStringExact(Text1.Text)
- n = ChkList1.SelectString(Text1.Text)
- If n > -1 Then
- MsgBox ("Not Found")
- End If
- End Sub
- Private Sub Command6_Click()
- ChkList1.CheckItem ChkList1.GetCurSel
- End Sub
- Private Sub Command7_Click()
- ChkList1.UnCheckAll
- End Sub
- Private Sub Command8_Click()
- ChkList1.CheckAll
- End Sub
- Private Sub Form_Load()
- For i = 0 To 20
- 'If i Mod 2 = 0 Then
- 'ChkList1.AddString "Test" + Chr(9) + "Line " + Chr(85 - i)
- 'Else
- ChkList1.AddStringCheck "Test Line " + Chr(85 - i), True
- 'End If
- Next i
- End Sub
-